package xyz.zhouzhousag.service.impl;
/**
 * Description:
 * <p>
 * ClassName: ProductService
 * date: 2021/3/16 14:51
 *
 * @author Yin.Liu
 * @version 1.0
 * @since JDK 1.8
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xyz.zhouzhousag.dao.IProductDAO;
import xyz.zhouzhousag.domain.Product;
import xyz.zhouzhousag.service.IProductService;

import java.util.List;

/**
 *@ClassName ProductService
 *@Description TODO
 *@Author Yin.Liu8
 *@Date 2021/3/16 14:51
 *@Version 1.0
 */
@Service
@Transactional
public class ProductService implements IProductService {
    @Autowired
    private IProductDAO productDAO;

    @Override
    public List<Product> findAll() {
        return productDAO.findAll();
    }

    @Override
    public void save(Product product) {
        productDAO.save(product);
    }
}
